package com.ecoolex.ying.space.ws;

import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;
import com.ecoolex.ying.space.core.manager.MarktingCatalogManager;
import com.ecoolex.ying.space.entity.MarktingCatalog;
import com.ecoolex.ying.space.pojo.QueryMarktingCatalogDTO;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;


@Service
public class MarktingCatalogServiceImpl implements MarktingCatalogService {


    @Autowired
    private MarktingCatalogManager marktingCatalogManager;

    @Override
    public MarktingCatalog addCatalog(MarktingCatalog record, String createUser) throws BizException {
        return marktingCatalogManager.add(record, createUser);
    }

    @Override
    public MarktingCatalog updateCatalog(MarktingCatalog record, String updateUser) throws BizException {
        return marktingCatalogManager.update(record, updateUser);
    }

    @Override
    public void deleteCatalog(MarktingCatalog record, String updateUser) throws BizException {
        marktingCatalogManager.delete(record, updateUser);
    }

    @Override
    public MarktingCatalog getCatalogById(Integer catalogId) {
        return marktingCatalogManager.getById(catalogId);
    }

    @Override
    public Pagination<MarktingCatalog> queryMarktingCatalog(QueryMarktingCatalogDTO query, Sorting[] sorts, Page page) {
        return marktingCatalogManager.query(query, sorts, page);
    }

	@Override
	public void online(MarktingCatalog record, String updateUser) throws BizException {
		marktingCatalogManager.online(record, updateUser);
	}

	@Override
	public void offline(MarktingCatalog record, String updateUser) throws BizException {
		marktingCatalogManager.offline(record, updateUser);
	}

	@Override
	public Pagination<MarktingCatalog> queryMarktingCatalogForH5(Page page) {
		return marktingCatalogManager.queryForH5(page);
	}

}
